package model;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import org.hibernate.annotations.GenericGenerator;

/**
 * Compiler entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "compiler", catalog = "clode")
public class Compiler implements java.io.Serializable {

	// Fields

	private Integer id;
	private String language;
	private String name;
	private String path;
	private String arguments;
	private Set<Setting> settings = new HashSet<Setting>(0);

	// Constructors

	/** default constructor */
	public Compiler() {
	}

	/** full constructor */
	public Compiler(String language, String name, String path,
			String arguments, Set<Setting> settings) {
		this.language = language;
		this.name = name;
		this.path = path;
		this.arguments = arguments;
		this.settings = settings;
	}

	// Property accessors
	@GenericGenerator(name = "generator", strategy = "increment")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "language", length = 30)
	public String getLanguage() {
		return this.language;
	}

	public void setLanguage(String language) {
		this.language = language;
	}

	@Column(name = "name", length = 30)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "path", length = 100)
	public String getPath() {
		return this.path;
	}

	public void setPath(String path) {
		this.path = path;
	}

	@Column(name = "arguments", length = 100)
	public String getArguments() {
		return this.arguments;
	}

	public void setArguments(String arguments) {
		this.arguments = arguments;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "compiler")
	public Set<Setting> getSettings() {
		return this.settings;
	}

	public void setSettings(Set<Setting> settings) {
		this.settings = settings;
	}

}